package xuegao.study.mall.admin.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import xuegao.study.mall.common.api.CommonResult;

import java.util.Map;

/**
 * Oauth2服务客户端
 */
@FeignClient(name = "study-oauth2-service", path = "/oauth")
public interface Oauth2Client {

    /**
     * 申请token
     * @param parameters parameters
     * @return token实体
     */
    @PostMapping(value = "/token")
    CommonResult getAccessToken(@RequestParam Map<String, String> parameters);
}
